<!DOCTYPE html>
<html>
<head>
    <title>$app.topic 新增用户</title>
    #parse("/inc/meta.htm")
</head>
<body id="inner_page_start">
#parse("/inc/header.htm")
<div id="wrapper">
    #parse("/inc/menu.htm")
    <div id="content-wrapper">
        <div class="container-fluid">
            <!-- 面包屑-->
            <ol class="breadcrumb">
                <li class="breadcrumb-item">
                    用户管理
                </li>
                <li class="breadcrumb-item active">用户信息编辑</li>
            </ol>
        </div>
        <!-- /.container-fluid -->
        <div class="container-fluid">

            <form method="post" action="/users/add">
                <input type="hidden" value="$!respData.id" name="id" />
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label for="inputName" class="col-sm-2 col-form-label">姓名</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" id="inputName" placeholder="姓名"
                           value="$!respData.uname" name="uname" />
                    </div>
                    <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label for="inputTelphone" class="col-sm-2 col-form-label">手机号码</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control" id="inputTelphone" placeholder="手机号码"
                               value="$!respData.tel" name="tel" />
                    </div>
                        <div class="col-sm-2"></div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label for="inputPassword3" class="col-sm-2 col-form-label">密码</label>
                    <div class="col-sm-6">
                        <input type="password" class="form-control" id="inputPassword3" placeholder="密码" name="password" />
                    </div>
                        <div class="col-sm-2"></div>
                </div>
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">上级:</label>
                    <div class="col-sm-6">
                        <select name="pid" class="form-control">
                            <option value="0" #if($!respData.pid ==0 ) selected #end >无</option>
                            #foreach( $puser in ${pusers} )
                            <option value="$puser.id" #if($!respData.pid ==$puser.id ) selected #end >$!puser.uname</option>
                            #end
                        </select>
                    </div>
                        <div class="col-sm-2"></div>
                </div>
                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">角色:</label>
                    <div class="col-sm-6">
                        <select name="role" class="form-control">
                            #foreach( $role in ${roles} )
                            <option value="$role.role" #if($!respData.role ==$role.role) selected #end>$role.gname</option>
                            #end
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">状态:</label>
                    <div class="col-sm-6">
                        <select name="state" class="form-control">
                            <option value="0" #if($!respData.state == 0) selected #end>启用</option>
                            <option value="1" #if($!respData.state == 1) selected #end>禁用</option>
                        </select>
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">头像：</label>
                    <div class="col-sm-6">
                        <input class="form-control" name="img" value="$!respData.img" />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-sm-2"></div>
                    <label class="col-sm-2 col-form-label">渠道码：</label>
                    <div class="col-sm-6">
                        <input class="form-control" name="qcode" value="$!respData.qcode" />
                    </div>
                </div>

                <div class="form-group  row">
                    <div class="col-sm-4"></div>
                    <div class="col-sm-1">
                        <button onclick="window.history.back()" class="btn" type="button">取消</button></div>
                    <div class="col-sm-1"><button type="submit" class="btn btn-primary">提交</button></div>
                </div>
            </form>

        </div>
        #parse("/inc/copyright.htm")
    </div>
    <!-- /.content-wrapper -->
</div>
#parse("/inc/footer.htm")
</body>
</html>